package com.mf.service.utils.numericalProcedure.CalculateProcedure;

import com.mf.bo.calculateHistory.CalculateHistoryBo;
import com.mf.bo.calculateHistory.ProfitBo;
import com.mf.service.IWeekCodeHistoryService;
import com.mf.service.utils.numericalProcedure.BasicNumerical;
import com.mf.service.utils.numericalProcedure.NumericalProcedure1;
import com.mf.vo.StockGatherVo;

/**
 * @Author: lmf
 * @Create: 2024/6/13 21:32
 * Description: 计算方案1
 */
public class CalculateProcedure1  implements CalculateProcedure {
    /**
     * 计算方案是否合理
     *
     * @param stockGatherVo 指标集合
     * @return 符合条件list集合
     */
    @Override
    public CalculateHistoryBo calculate(StockGatherVo stockGatherVo,CalculateProcedure calculateProcedure) {
        return BasicNumerical.Calculate(stockGatherVo, calculateProcedure);
    }
    /**
     * 盈利策略计算
     *
     * @param stockGatherVo 指标集合
     * @param i          当前检查日期下标
     * @return 是否盈利 盈利返回股票代码 否则返回null
     */
    @Override
    public String isBuyableDay(StockGatherVo stockGatherVo, int i) {
        return NumericalProcedure1.isBuyableDay(stockGatherVo, i);
    }

    /**
     * 判断当天是否盈利
     *
     * @param stockGatherVo          指标集合
     * @param i                      当前检查日期下标
     * @param calculateHistoryBoList 单个代码在日期范围内成功失败的集合
     * @return 当前检查日期的盈利情况
     */
    @Override
    public ProfitBo getProfitBo(StockGatherVo stockGatherVo, int i, CalculateHistoryBo calculateHistoryBoList) {
        return NumericalProcedure1.getProfitBo(stockGatherVo, i, calculateHistoryBoList);
    }
}
